﻿using System;
using System.Diagnostics;
using LightPersist;
using LightPersist.Storage;
using Dom;

namespace Sample
{
	static class Class1
	{
		static void Main()
		{
			Trace.Listeners.Add(new ConsoleTraceListener());
			Console.WriteLine("Start.");

			using (var db = LightPersistFactory.Open<InmemoryStorage, DomMetainfo>("test"))
			{
				db.Execute = delegate
				{
					var root = db.RootClass<Node>();
					var node = db.Create<Node>();
					root.Children.Add(node);
				};
			}
		}
	}
}